/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.avj.g17.chat.common;

import com.avj.g17.chat.common.model.Client;
import com.avj.g17.chat.common.model.Message;
import com.avj.g17.chat.common.model.User;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

/**
 *
 * @author Hai Nguyen <hain186@gmail.com>
 */
public interface ChatAPI extends Remote {

    public void sendMessage(Message message) throws RemoteException;

    public Message receiveMessage() throws RemoteException;

    public void registerChatClient(Client client) throws RemoteException;

    public boolean login(String username, String password) throws RemoteException;

    public boolean logout(String username) throws RemoteException;

    public void signup(User user) throws RemoteException;

    public List<Client> getListUserOnline() throws RemoteException;

    public Client findClient(String username) throws RemoteException;
}
